<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * @fileoverview 运行文件上传组件
<span class='line'>  3</span>  * @author 剑平（明河）&lt;minghe36@126.com>,紫英&lt;daxingplay@gmail.com>
<span class='line'>  4</span>  **/</span><span class="WHIT">
<span class='line'>  5</span> </span><span class="NAME">KISSY.add</span><span class="PUNC">(</span><span class="STRN">'gallery/form/1.1/uploader/index'</span><span class="PUNC">,</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">S</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Base</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Node</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Uploader</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Button</span><span class="PUNC">,</span><span class="NAME">SwfButton</span><span class="PUNC">,</span><span class="NAME">Auth</span><span class="PUNC">,</span><span class="NAME">Queue</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>  6</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">EMPTY</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">$</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Node.all</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">LOG_PREFIX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'[uploaderRender]:'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>  7</span> </span><span class="WHIT">        </span><span class="NAME">dataName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>  8</span> </span><span class="WHIT">            </span><span class="NAME">CONFIG</span><span class="PUNC">:</span><span class="STRN">'data-config'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>  9</span> </span><span class="WHIT">            </span><span class="NAME">BUTTON_CONFIG</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'data-button-config'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 10</span> </span><span class="WHIT">            </span><span class="NAME">THEME_CONFIG</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'data-theme-config'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 11</span> </span><span class="WHIT">            </span><span class="NAME">AUTH</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'data-auth'</span><span class="WHIT">
<span class='line'> 12</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 13</span> </span><span class="WHIT">        </span><span class="COMM">//所支持的内置主题</span><span class="WHIT">
<span class='line'> 14</span> </span><span class="WHIT">        </span><span class="NAME">THEMES</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">'default'</span><span class="PUNC">,</span><span class="STRN">'imageUploader'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'ershouUploader'</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 15</span> </span><span class="WHIT">        </span><span class="COMM">//内置主题路径前缀</span><span class="WHIT">
<span class='line'> 16</span> </span><span class="WHIT">        </span><span class="NAME">THEME_PREFIX</span><span class="PUNC">=</span><span class="STRN">'gallery/form/1.1/uploader/themes/'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 17</span> </span><span class="WHIT">    </span><span class="NAME">S.namespace</span><span class="PUNC">(</span><span class="STRN">'form'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 18</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 19</span>      * 解析组件在页面中data-config成为组件的配置
<span class='line'> 20</span>      * @param {String} hook 组件钩子
<span class='line'> 21</span>      * @param {String} dataConfigName 配置名
<span class='line'> 22</span>      * @return {Object}
<span class='line'> 23</span>      */</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="WHIT">    </span><span class="NAME">S.form.parseConfig</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hook</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">dataConfigName</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">sConfig</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">DATA_CONFIG</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">dataConfigName</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">dataName.CONFIG</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="WHIT">        </span><span class="NAME">sConfig</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="NAME">hook</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="NAME">DATA_CONFIG</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="WHIT">        </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">S.isString</span><span class="PUNC">(</span><span class="NAME">sConfig</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 28</span> </span><span class="WHIT">        </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 29</span> </span><span class="WHIT">            </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">S.JSON.parse</span><span class="PUNC">(</span><span class="NAME">sConfig</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">err</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 31</span> </span><span class="WHIT">            </span><span class="NAME">S.log</span><span class="PUNC">(</span><span class="NAME">LOG_PREFIX</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'请检查'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">hook</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'上'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">DATA_CONFIG</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'属性内的json格式是否符合规范！'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">config</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 34</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 35</span> 
<span class='line'> 36</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 37</span>      * @name RenderUploader
<span class='line'> 38</span>      * @class 异步文件上传入口文件，会从按钮的data-config='{}' 伪属性中抓取组件配置
<span class='line'> 39</span>      * @version 1.1.4
<span class='line'> 40</span>      * @constructor
<span class='line'> 41</span>      * @param {String | HTMLElement} buttonTarget *，上传按钮目标元素
<span class='line'> 42</span>      * @param {String | HTMLElement} queueTarget *，文件队列目标元素
<span class='line'> 43</span>      * @param {Object} config 配置，该配置好覆盖data-config伪属性中的数据
<span class='line'> 44</span>      * @requires Uploader
<span class='line'> 45</span>      * @requires Button
<span class='line'> 46</span>      * @requires SwfButton
<span class='line'> 47</span>      * @requires Auth
<span class='line'> 48</span>      * @requires Queue
<span class='line'> 49</span>      * @example
<span class='line'> 50</span>      * &lt;a id="J_UploaderBtn" class="uploader-button" data-config=
<span class='line'> 51</span>      '{"type" : "auto",
<span class='line'> 52</span>      "serverConfig":{"action":"upload.php"},
<span class='line'> 53</span>      "name":"Filedata",
<span class='line'> 54</span>      "urlsInputName":"fileUrls"}'
<span class='line'> 55</span>      href="#">
<span class='line'> 56</span>      选择要上传的文件
<span class='line'> 57</span>      &lt;/a>
<span class='line'> 58</span>      &lt;ul id="J_UploaderQueue">
<span class='line'> 59</span> 
<span class='line'> 60</span>      &lt;/ul>
<span class='line'> 61</span>      * @example
<span class='line'> 62</span>      *
<span class='line'> 63</span> KISSY.use('gallery/form/1.1/uploader/index', function (S, RenderUploader) {
<span class='line'> 64</span>      var ru = new RenderUploader('#J_UploaderBtn', '#J_UploaderQueue');
<span class='line'> 65</span>      ru.on("init", function (ev) {
<span class='line'> 66</span>         var uploader = ev.uploader;
<span class='line'> 67</span>      })
<span class='line'> 68</span> })
<span class='line'> 69</span>      */</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">    </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">RenderUploader</span><span class="PUNC">(</span><span class="NAME">buttonTarget</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">queueTarget</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">config</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">        </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">        </span><span class="COMM">//合并配置</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">        </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">S.mix</span><span class="PUNC">(</span><span class="NAME">S.form.parseConfig</span><span class="PUNC">(</span><span class="NAME">buttonTarget</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">        </span><span class="COMM">//超类初始化</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT">        </span><span class="NAME">RenderUploader.superclass.constructor.call</span><span class="PUNC">(</span><span class="NAME">self</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">        </span><span class="NAME">self.set</span><span class="PUNC">(</span><span class="STRN">'buttonTarget'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">buttonTarget</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="WHIT">        </span><span class="NAME">self.set</span><span class="PUNC">(</span><span class="STRN">'queueTarget'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">queueTarget</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">        </span><span class="NAME">self.set</span><span class="PUNC">(</span><span class="STRN">'uploaderConfig'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">        </span><span class="NAME">self._init</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 81</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 82</span>      * @name RenderUploader#init
<span class='line'> 83</span>      * @desc 上传组件完全初始化成功后触发，对uploader的操作务必先监听init事件
<span class='line'> 84</span>      * @event
<span class='line'> 85</span>      * @param {Uploader} ev.uploader   Uploader的实例
<span class='line'> 86</span>      * @param {Uploader} ev.button   Button的实例
<span class='line'> 87</span>      * @param {Uploader} ev.queue   Queue的实例
<span class='line'> 88</span>      * @param {Uploader} ev.auth   Auth的实例
<span class='line'> 89</span>      */</span><span class="WHIT">
<span class='line'> 90</span> 
<span class='line'> 91</span> </span><span class="WHIT">    </span><span class="NAME">S.extend</span><span class="PUNC">(</span><span class="NAME">RenderUploader</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Base</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">/** @lends RenderUploader.prototype*/</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 92</span> </span><span class="WHIT">        </span><span class="COMM">/**
<span class='line'> 93</span>          * 初始化组件
<span class='line'> 94</span>          */</span><span class="WHIT">
<span class='line'> 95</span> </span><span class="WHIT">        </span><span class="NAME">_init</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 96</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT">                </span><span class="COMM">//按钮</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT">                </span><span class="NAME">button</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self._initButton</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT">                </span><span class="COMM">//队列</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT">                </span><span class="NAME">queue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self._initQueue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">                </span><span class="COMM">//上传组件</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT">                </span><span class="NAME">uploader</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self._initUploader</span><span class="PUNC">(</span><span class="NAME">button</span><span class="PUNC">,</span><span class="NAME">queue</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT">                </span><span class="COMM">//上传验证</span><span class="WHIT">
<span class='line'>104</span> </span><span class="WHIT">                </span><span class="NAME">auth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self._auth</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">                </span><span class="NAME">classes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">uploader</span><span class="PUNC">:</span><span class="NAME">uploader</span><span class="PUNC">,</span><span class="NAME">button</span><span class="PUNC">:</span><span class="NAME">button</span><span class="PUNC">,</span><span class="NAME">queue</span><span class="PUNC">:</span><span class="NAME">queue</span><span class="PUNC">,</span><span class="NAME">auth</span><span class="PUNC">:</span><span class="NAME">auth</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">                </span><span class="COMM">//主题路径</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">                </span><span class="NAME">theme</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.get</span><span class="PUNC">(</span><span class="STRN">'theme'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">            </span><span class="NAME">self.set</span><span class="PUNC">(</span><span class="STRN">'button'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">button</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">            </span><span class="COMM">//不使用主题</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">theme</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">EMPTY</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">                </span><span class="NAME">S.later</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">                    </span><span class="NAME">self.fire</span><span class="PUNC">(</span><span class="STRN">'init'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">classes</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">                </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NUMB">500</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>114</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>115</span> </span><span class="WHIT">                </span><span class="NAME">self._initThemes</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">theme</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>116</span> </span><span class="WHIT">                    </span><span class="NAME">theme.set</span><span class="PUNC">(</span><span class="STRN">'uploader'</span><span class="PUNC">,</span><span class="NAME">uploader</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>117</span> </span><span class="WHIT">                    </span><span class="NAME">theme.set</span><span class="PUNC">(</span><span class="STRN">'button'</span><span class="PUNC">,</span><span class="NAME">button</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>118</span> </span><span class="WHIT">                    </span><span class="NAME">theme.set</span><span class="PUNC">(</span><span class="STRN">'queue'</span><span class="PUNC">,</span><span class="NAME">queue</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT">                    </span><span class="NAME">theme.set</span><span class="PUNC">(</span><span class="STRN">'auth'</span><span class="PUNC">,</span><span class="NAME">auth</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>120</span> </span><span class="WHIT">                    </span><span class="NAME">theme._UploaderRender</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>121</span> </span><span class="WHIT">                        </span><span class="COMM">// 抓取restoreHook容器内的数据，生成文件DOM</span><span class="WHIT">
<span class='line'>122</span> </span><span class="WHIT">                        </span><span class="NAME">uploader.restore</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>123</span> </span><span class="WHIT">                        </span><span class="NAME">theme.afterUploaderRender</span><span class="PUNC">(</span><span class="NAME">uploader</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">                        </span><span class="NAME">self.fire</span><span class="PUNC">(</span><span class="STRN">'init'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">classes</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">                    </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">                </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT">        </span><span class="COMM">/**
<span class='line'>130</span>          * 初始化Uploader
<span class='line'>131</span>          * @param { Button} button Button的实例
<span class='line'>132</span>          * @param { Queue} queue Queue的实例
<span class='line'>133</span>          * @return {Uploader}
<span class='line'>134</span>          */</span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT">        </span><span class="NAME">_initUploader</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">button</span><span class="PUNC">,</span><span class="NAME">queue</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">uploaderConfig</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.get</span><span class="PUNC">(</span><span class="STRN">'uploaderConfig'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">                </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.get</span><span class="PUNC">(</span><span class="STRN">'name'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">            </span><span class="NAME">S.mix</span><span class="PUNC">(</span><span class="NAME">uploaderConfig.serverConfig</span><span class="PUNC">,</span><span class="PUNC">{</span><span class="STRN">'fileDataName'</span><span class="PUNC">:</span><span class="NAME">name</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">            </span><span class="COMM">//配置增加按钮实例和队列实例</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">            </span><span class="NAME">S.mix</span><span class="PUNC">(</span><span class="NAME">uploaderConfig</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">button</span><span class="PUNC">:</span><span class="NAME">button</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">queue</span><span class="PUNC">:</span><span class="NAME">queue</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">uploader</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Uploader</span><span class="PUNC">(</span><span class="NAME">uploaderConfig</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">            </span><span class="NAME">uploader.render</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT">            </span><span class="NAME">self.set</span><span class="PUNC">(</span><span class="STRN">'uploader'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">uploader</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>144</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">uploader</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>145</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>146</span> </span><span class="WHIT">        </span><span class="COMM">/**
<span class='line'>147</span>          * 初始化模拟的上传按钮
<span class='line'>148</span>          * @return {Button}
<span class='line'>149</span>          */</span><span class="WHIT">
<span class='line'>150</span> </span><span class="WHIT">        </span><span class="NAME">_initButton</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT">                </span><span class="NAME">target</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.get</span><span class="PUNC">(</span><span class="STRN">'buttonTarget'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">                </span><span class="COMM">//从html标签的伪属性中抓取配置</span><span class="WHIT">
<span class='line'>154</span> </span><span class="WHIT">                </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">S.form.parseConfig</span><span class="PUNC">(</span><span class="NAME">target</span><span class="PUNC">,</span><span class="NAME">dataName.BUTTON_CONFIG</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT">                </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.get</span><span class="PUNC">(</span><span class="STRN">'name'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">                </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.get</span><span class="PUNC">(</span><span class="STRN">'type'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>157</span> </span><span class="WHIT">            </span><span class="COMM">//合并配置</span><span class="WHIT">
<span class='line'>158</span> </span><span class="WHIT">            </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">S.merge</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">name</span><span class="PUNC">:</span><span class="NAME">name</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>159</span> </span><span class="WHIT">            </span><span class="COMM">//实例化上传按钮</span><span class="WHIT">
<span class='line'>160</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">type</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'flash'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Button</span><span class="PUNC">(</span><span class="NAME">target</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">config</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">SwfButton</span><span class="PUNC">(</span><span class="NAME">target</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">        </span><span class="COMM">/**
<span class='line'>163</span>          * 初始化队列
<span class='line'>164</span>          * @return {Queue}
<span class='line'>165</span>          */</span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">        </span><span class="NAME">_initQueue</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>167</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Queue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>168</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>169</span> </span><span class="WHIT">        </span><span class="COMM">/**
<span class='line'>170</span>          * 初始化主题
<span class='line'>171</span>          * @param {Function} callback 主题加载完成后的执行的回调函数
<span class='line'>172</span>          */</span><span class="WHIT">
<span class='line'>173</span> </span><span class="WHIT">        </span><span class="NAME">_initThemes</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">callback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">theme</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.get</span><span class="PUNC">(</span><span class="STRN">'theme'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">                </span><span class="NAME">target</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.get</span><span class="PUNC">(</span><span class="STRN">'buttonTarget'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>176</span> </span><span class="WHIT">                </span><span class="COMM">//从html标签的伪属性中抓取配置</span><span class="WHIT">
<span class='line'>177</span> </span><span class="WHIT">                </span><span class="NAME">config</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">S.form.parseConfig</span><span class="PUNC">(</span><span class="NAME">target</span><span class="PUNC">,</span><span class="NAME">dataName.THEME_CONFIG</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>178</span> </span><span class="WHIT">            </span><span class="COMM">//如果只是传递主题名，组件自行拼接</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT">            </span><span class="NAME">theme</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self._getThemeName</span><span class="PUNC">(</span><span class="NAME">theme</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT">            </span><span class="NAME">S.use</span><span class="PUNC">(</span><span class="NAME">theme</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">S</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">Theme</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT">                </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">queueTarget</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.get</span><span class="PUNC">(</span><span class="STRN">'queueTarget'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">theme</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>182</span> </span><span class="WHIT">                </span><span class="NAME">S.mix</span><span class="PUNC">(</span><span class="NAME">config</span><span class="PUNC">,</span><span class="PUNC">{</span><span class="NAME">queueTarget</span><span class="PUNC">:</span><span class="NAME">queueTarget</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>183</span> </span><span class="WHIT">                </span><span class="NAME">theme</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Theme</span><span class="PUNC">(</span><span class="NAME">config</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">                </span><span class="NAME">callback</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">callback.call</span><span class="PUNC">(</span><span class="NAME">self</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">theme</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>186</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>187</span> </span><span class="WHIT">        </span><span class="COMM">/**
<span class='line'>188</span>          * 获取正确的主题名
<span class='line'>189</span>          * @param {String} theme 主题名
<span class='line'>190</span>          * @return {String}
<span class='line'>191</span>          */</span><span class="WHIT">
<span class='line'>192</span> </span><span class="WHIT">        </span><span class="NAME">_getThemeName</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">theme</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>193</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">themeName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">theme</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>194</span> </span><span class="WHIT">            </span><span class="NAME">S.each</span><span class="PUNC">(</span><span class="NAME">THEMES</span><span class="PUNC">,</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">t</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>195</span> </span><span class="WHIT">               </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">t</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">theme</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>196</span> </span><span class="WHIT">                   </span><span class="NAME">themeName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">THEME_PREFIX</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">theme</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>197</span> </span><span class="WHIT">               </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>198</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>199</span> </span><span class="WHIT">            </span><span class="NAME">themeName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">themeName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'/index'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>200</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">themeName</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>202</span> </span><span class="WHIT">        </span><span class="COMM">/**
<span class='line'>203</span>          * 文件上传验证
<span class='line'>204</span>          */</span><span class="WHIT">
<span class='line'>205</span> </span><span class="WHIT">        </span><span class="NAME">_auth</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>206</span> </span><span class="WHIT">            </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="NAME">buttonTarget</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.get</span><span class="PUNC">(</span><span class="STRN">'buttonTarget'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>207</span> </span><span class="WHIT">                </span><span class="NAME">uploader</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.get</span><span class="PUNC">(</span><span class="STRN">'uploader'</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>208</span> </span><span class="WHIT">                </span><span class="NAME">rules</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">auth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">EMPTY</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>209</span> </span><span class="WHIT">            </span><span class="COMM">//存在验证配置</span><span class="WHIT">
<span class='line'>210</span> </span><span class="WHIT">            </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">$</span><span class="PUNC">(</span><span class="NAME">buttonTarget</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="NAME">dataName.AUTH</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>211</span> </span><span class="WHIT">                </span><span class="NAME">rules</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">S.form.parseConfig</span><span class="PUNC">(</span><span class="NAME">buttonTarget</span><span class="PUNC">,</span><span class="NAME">dataName.AUTH</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>212</span> </span><span class="WHIT">                </span><span class="NAME">auth</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Auth</span><span class="PUNC">(</span><span class="NAME">uploader</span><span class="PUNC">,</span><span class="PUNC">{</span><span class="NAME">rules</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">rules</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>213</span> </span><span class="WHIT">                </span><span class="NAME">uploader.set</span><span class="PUNC">(</span><span class="STRN">'auth'</span><span class="PUNC">,</span><span class="NAME">auth</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>214</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>215</span> </span><span class="WHIT">                </span><span class="NAME">S.log</span><span class="PUNC">(</span><span class="NAME">LOG_PREFIX</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'缺少data-auth验证配置，无启动验证！'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>216</span> </span><span class="WHIT">            </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>217</span> </span><span class="WHIT">            </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">auth</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>218</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>219</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>220</span> </span><span class="WHIT">        </span><span class="NAME">ATTRS</span><span class="PUNC">:</span><span class="COMM">/** @lends RenderUploader.prototype*/</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>221</span> </span><span class="WHIT">            </span><span class="COMM">/**
<span class='line'>222</span>              * 主题引用路径
<span class='line'>223</span>              * @type String
<span class='line'>224</span>              * @default  “gallery/form/1.1/uploader/themes/default”
<span class='line'>225</span>              */</span><span class="WHIT">
<span class='line'>226</span> </span><span class="WHIT">            </span><span class="NAME">theme</span><span class="PUNC">:</span><span class="PUNC">{</span><span class="NAME">value</span><span class="PUNC">:</span><span class="STRN">'gallery/form/1.1/uploader/themes/default'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>227</span> </span><span class="WHIT">            </span><span class="COMM">/**
<span class='line'>228</span>              * 按钮目标元素
<span class='line'>229</span>              * @type String|HTMLElement|KISSY.NodeList
<span class='line'>230</span>              * @default ""
<span class='line'>231</span>              */</span><span class="WHIT">
<span class='line'>232</span> </span><span class="WHIT">            </span><span class="NAME">buttonTarget</span><span class="PUNC">:</span><span class="PUNC">{</span><span class="NAME">value</span><span class="PUNC">:</span><span class="NAME">EMPTY</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>233</span> </span><span class="WHIT">            </span><span class="COMM">/**
<span class='line'>234</span>              * 队列目标元素
<span class='line'>235</span>              * @default ""
<span class='line'>236</span>              * @type String|HTMLElement|KISSY.Node
<span class='line'>237</span>              */</span><span class="WHIT">
<span class='line'>238</span> </span><span class="WHIT">            </span><span class="NAME">queueTarget</span><span class="PUNC">:</span><span class="PUNC">{</span><span class="NAME">value</span><span class="PUNC">:</span><span class="NAME">EMPTY</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>239</span> </span><span class="WHIT">            </span><span class="COMM">/**
<span class='line'>240</span>              * 上传组件配置
<span class='line'>241</span>              * @type Object
<span class='line'>242</span>              * @default {}
<span class='line'>243</span>              */</span><span class="WHIT">
<span class='line'>244</span> </span><span class="WHIT">            </span><span class="NAME">uploaderConfig</span><span class="PUNC">:</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>245</span> </span><span class="WHIT">            </span><span class="COMM">/**
<span class='line'>246</span>              * Button（上传按钮）的实例
<span class='line'>247</span>              * @type Button
<span class='line'>248</span>              * @default ""
<span class='line'>249</span>              */</span><span class="WHIT">
<span class='line'>250</span> </span><span class="WHIT">            </span><span class="NAME">button</span><span class="PUNC">:</span><span class="PUNC">{</span><span class="NAME">value</span><span class="PUNC">:</span><span class="NAME">EMPTY</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>251</span> </span><span class="WHIT">            </span><span class="COMM">/**
<span class='line'>252</span>              * Queue（上传队列）的实例
<span class='line'>253</span>              * @type Queue
<span class='line'>254</span>              * @default ""
<span class='line'>255</span>              */</span><span class="WHIT">
<span class='line'>256</span> </span><span class="WHIT">            </span><span class="NAME">queue</span><span class="PUNC">:</span><span class="PUNC">{</span><span class="NAME">value</span><span class="PUNC">:</span><span class="NAME">EMPTY</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>257</span> </span><span class="WHIT">            </span><span class="COMM">/**
<span class='line'>258</span>              * 上传组件实例
<span class='line'>259</span>              * @type Uploader
<span class='line'>260</span>              * @default ""
<span class='line'>261</span>              */</span><span class="WHIT">
<span class='line'>262</span> </span><span class="WHIT">            </span><span class="NAME">uploader</span><span class="PUNC">:</span><span class="PUNC">{</span><span class="NAME">value</span><span class="PUNC">:</span><span class="NAME">EMPTY</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>263</span> </span><span class="WHIT">        </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>264</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>265</span> </span><span class="WHIT">    </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">RenderUploader</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>266</span> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">requires</span><span class="PUNC">:</span><span class="PUNC">[</span><span class="STRN">'base'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'node'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'./base'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'./button/base'</span><span class="PUNC">,</span><span class="STRN">'./button/swfButton'</span><span class="PUNC">,</span><span class="STRN">'./auth/base'</span><span class="PUNC">,</span><span class="STRN">'./queue'</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>267</span> </span></pre></body></html>